/**
 * Created by zhouwei on 2017/4/22.
 */

/**
 * Created by zhouwei on 2017/4/22.
 */
import api from '../../src/common/index'
import helper from '../../src/common/helper'

export default {
    //获取验证码
    getVerifyCode:function (Phonono,success) {
        let params = {"Phoneno":Phonono};
        api.sms.post(params,success);
    },
    useVericodeToLogin:function (Phonono,veriCode,success) {
        let params = {"Code":veriCode,"Phoneno":Phonono};
        api.goverment.login(params,function (data) {
            helper.localStorage('token',data.Token);
            helper.localStorage('userMsg',data);
            helper.localStorage('loginState','success');
            helper.localStorage('location','130922000000');
            success(data);
        })
    }
}